﻿<phone:PhoneApplicationPage x:Class="MessyMessengerShinyService.View.ChildPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
                            xmlns:Behaviors="clr-namespace:WP7Contrib.View.Controls.Behaviors;assembly=WP7Contrib.View.Controls"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait"
                            Orientation="Portrait"
                            mc:Ignorable="d"
                            d:DesignHeight="696"
                            d:DesignWidth="480"
                            shell:SystemTray.IsVisible="True"
                            DataContext="{Binding ChildViewModel, Source={StaticResource Locator}}">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot"
          Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="603" />
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel"
                    Grid.Row="0"
                    Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle"
                       Text="MY APPLICATION"
                       Style="{StaticResource PhoneTextNormalStyle}"
                       FontSize="{StaticResource PhoneFontSizeMedium}"
                       FontFamily="{StaticResource PhoneFontFamilySemiLight}" />
            <TextBlock x:Name="PageTitle"
                       Text="details"
                       Margin="9,-7,0,0"
                       Style="{StaticResource PhoneTextTitle1Style}"
                       FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                       FontSize="{StaticResource PhoneFontSizeExtraExtraLarge}" />
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel"
              Grid.Row="1"
              Margin="12,0,12,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="90" />
                <RowDefinition Height="513" />
            </Grid.RowDefinitions>
            <StackPanel Orientation="Vertical">
                <TextBlock Text="{Binding CurrentlySelectedPerson.LastName}"
                           FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                           FontSize="{StaticResource PhoneFontSizeMediumLarge}" />
                <TextBlock Text="{Binding CurrentlySelectedPerson.FirstName}"
                           FontFamily="{StaticResource PhoneFontFamilySemiLight}"
                           FontSize="{StaticResource PhoneFontSizeMedium}" />
            </StackPanel>
            <Border Grid.Row="1"
                    BorderThickness="2">
                <Image Source="{Binding CurrentlySelectedPerson.ProfileImage}" />
            </Border>
        </Grid>
    </Grid>

    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True"
                              IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="AddToFavourites"
                                            IconUri="/resources/icons/appbar.favs.addto.rest.png"
                                            Text="AddToFavourites" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>

    <i:Interaction.Behaviors>
        <Behaviors:ApplicationBarIconButtonCommand TextKey="AddToFavourites"
                                                   CommandBinding="{Binding SelectAddToFavouritesCommand}" />
    </i:Interaction.Behaviors>

</phone:PhoneApplicationPage>